var db = require('../model');
var utils = require('../utils');

module.exports = {
  get:function(req,res,next){
    var userid = req.query.userid;
    db.notebook.find({
      owner:{
       $in: [userid,-1]
      }
    }).then(ret=>{
      res.json(utils.formatResult(ret));
    },next);
  }
};
